namespace FineCollection.Intf
{
    /// <summary>
    /// A list (read only).
    /// </summary>
    /// <typeparam name="T">type of an item.</typeparam>
    public interface RList<T> : RCollection<T>
    {

        /// <summary>
        /// The first item.
        /// Raises an exception when the collection is empty.
        /// </summary>
        /// <exception cref="CollectionIsEmpty">when the collection is empty.</exception>
        T First { get; }

        /// <summary>
        /// The last item.
        /// Raises an exception when the collection is empty.
        /// </summary>
        /// <exception cref="CollectionIsEmpty">when the collection is empty.</exception>
        T Last { get; }

    }
}